package com.cz.nongyetongv5.bean;

import java.io.Serializable;

import com.cz.nongyetongv5.utils.CharsetUtil;

public class YangPinBianHao implements Serializable {

	private static final long serialVersionUID = 1L;

	private String sufString;

	private String bianHao1;

	private String bianHao2;

	public String getSufString() {
		return sufString;
	}

	public void setSufString(String sufString) {
		this.sufString = sufString;
	}

	public String getBianHao1() {
		return bianHao1;
	}

	public void setBianHao1(String bianHao1) {
		this.bianHao1 = bianHao1;
	}

	public String getBianHao2() {
		return bianHao2;
	}

	public void setBianHao2(String bianHao2) {
		this.bianHao2 = bianHao2;
	}

	public YangPinBianHao(String sufString, String bianHao1, String bianHao2) {
		this.sufString = sufString;
		this.bianHao1 = bianHao1;
		this.bianHao2 = bianHao2;
	}

	public YangPinBianHao() {
	}
    private String ewmString;
	public String getBianHaoString() {
     if(this.getEwmString()!=null&&!this.getEwmString().equals("")){
    	 return ewmString;
     }
		String bianhao = this.sufString + this.bianHao1;

		if (CharsetUtil.isNotNull(bianHao2)) {

			bianhao += "-" + this.bianHao2;
		}

		return bianhao;

	}

	public String getEwmString() {
		return ewmString;
	}

	public void setEwmString(String ewmString) {
		this.ewmString = ewmString;
	}

}
